package com.sykj.springboot.test.designMode.multitionPattern;


import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class main {


    /**
     * @author lining
     * @date 2022/5/30 11:39
     * @description 多例模式
     **/
    public static void main(String[] args) {
        Gson gson = new GsonBuilder().disableHtmlEscaping().create();
        Emperor instance1 = Emperor.getInstance();
        System.out.println(gson.toJson(instance1));

        Emperor instance2 = Emperor.getInstance();
        System.out.println(gson.toJson(instance2));
    }
}
